package com.cfl.config.client.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/client/")
@RefreshScope	// 需要刷新配置文件的类
public class ClientController {

	@Value("${profile}")
	private String profile;
	
	@RequestMapping("getProfile")
	@ResponseBody
	public String getProfile() {
		
		return this.profile;
	}
}
